/*
 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __LED_H__
#define __LED_H__

typedef enum
{
    LED_ID_NONE = 0,
    LED_ID_R,
    LED_ID_G,
    LED_ID_Y
} LED_ID_TYPE;


/*
  Description: 
      Init LED GPIO ,Set GPIO output

  Parameter:
      NA

  Return Value:
      NA
*/
void LED_Init(void);


/*
  Description: 
      Set the LED on and off directly.

  Parameter:
      ledid    --  LED ID See LED_ID_TYPE
      enable   --  0： off  1：on

  Return Value:
      0 ： LED off
      1 ： LED on
*/
void LEDonoff(LED_ID_TYPE ledid,bool enable);

/*
  Description: 
      Toggle LED status.

  Parameter:
      ledid    --  LED ID See LED_ID_TYPE

  Return Value:
      0 ： LED off
      1 ： LED on
*/
int LEDToggle(LED_ID_TYPE ledid);

/*
  Description: 
      Get LED status.

  Parameter:
      ledid    --  LED ID See LED_ID_TYPE

  Return Value:
      0 ： LED off
      1 ： LED on
*/
int LEDStatus(LED_ID_TYPE ledid);

#endif /* __LED_H__ */

